#include "libvdnEvent.h"

DEFINE_EVENT_TYPE( wxEVT_DOWNLOAD )
IMPLEMENT_DYNAMIC_CLASS(libvdnEvent, wxNotifyEvent)

libvdnEvent::libvdnEvent(wxEventType commandType, int id) :
	wxNotifyEvent(commandType,id),
	e_DownloadStatus(DOWNLOAD_NONE),
	e_DownloadedPercent(0)

		{
		}

	libvdnEvent::libvdnEvent(const libvdnEvent& event) : wxNotifyEvent(event)
		{
		e_DownloadStatus = (libvdnEvent::DownloadSTATUS)((libvdnEvent&)event).GetDownloadStatus();
		e_DownloadedPercent = ((libvdnEvent&)event).GetDownloadedPercent();
		e_sUrl = ((libvdnEvent&)event).GetDownloadUrl();
	    e_sFile = ((libvdnEvent&)event).GetDownloadFName();

		}

libvdnEvent::~libvdnEvent()
{
}

int libvdnEvent::GetDownloadStatus()
	{
	return (int)e_DownloadStatus;
	}


wxString libvdnEvent::GetDownloadUrl()
	{
	return e_sUrl;
	}

int libvdnEvent::GetErrorCode()
	{
	return e_ErrorCode;
	}

wxString libvdnEvent::GetCustomMessage()
	{
	return e_CustMsg;
	}


wxString libvdnEvent::GetDownloadFName()
	{
	return e_sFile;
	}

int libvdnEvent::GetDownloadedPercent()
	{
	return e_DownloadedPercent;
	}

int libvdnEvent::GetDownloadedBytes()
	{
	return e_DownloadedBytes;
	}
int libvdnEvent::GetTotalBytes()
	{
	return e_TotalFileSize;
	}


void libvdnEvent::SetDownloadStatus(int status)
	{
	e_DownloadStatus = (DownloadSTATUS)status;
	}

void libvdnEvent::SetDownloadUrl(wxString url)
	{
		e_sUrl = url;
	}

void libvdnEvent::SetDownloadUrl(const char url)
	{
	e_sUrl = wxString::FromAscii(url);
	}

void libvdnEvent::SetErrorCode(int code)
	{
	e_ErrorCode = code;
	}

void libvdnEvent::SetCustomMessage(wxString msg)
	{
	e_CustMsg = msg;
	}



void libvdnEvent::SetDownloadFName(wxString fname)
	{
	e_sFile = fname;
	}

void libvdnEvent::SetDownloadFName(const char fname)
	{
	e_sFile = wxString::FromAscii(fname);
	}

void libvdnEvent::SetDownloadedPercent(int perc)
	{
	e_DownloadedPercent = perc;
	}

void libvdnEvent::SetDownloadedBytes(int bytes)
	{
	e_DownloadedBytes = bytes;
	}

void libvdnEvent::SetTotalBytes(int bytes)
	{
	e_TotalFileSize = bytes;
	}


void libvdnEvent::SetParentWindow(wxWindow *parent)
	{
	e_parent = parent;
	}

wxWindow* libvdnEvent::GetParentWindow()
	{
	return e_parent;
	}


